package org.example.domain.model.entity.user.req;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Pattern;
import jakarta.validation.constraints.Size;


public class UserRegisterReq {
    @Schema(description = "用户名")
    @Size(max = 30, min = 3, message = "用户名长度应在3～30位字符内")
    private String userName;
    @Schema(description = "密码")
    //@Size(max = 20, min = 8, message = "密码长度应在8～20位字符内")
    @Pattern(
            regexp = "^(?=.*[0-9])(?=.*[a-zA-Z])(?=.*[@#$%^&+=!]).{8,20}$",
            message = "密码必须包含数字、字母、特殊字符，并且长度在8到20个字符之间"
    )
    private String password;
    @Schema(description = "邮箱")
    private String email;
    @Schema(description = "手机号")
    private String phoneNumber;


    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getPhoneNumber() {
        return phoneNumber;
    }

    public void setPhoneNumber(String phoneNumber) {
        this.phoneNumber = phoneNumber;
    }
}
